#ifndef COOLPOOL_GLPICKER_H_
#define COOLPOOL_GLPICKER_H_

#include <GL/freeglut.h>
#include <iostream>

namespace coolpool
{
	const int BUFF_SIZE = 512;

	// OpenGL picking base class, before picking call startPicking
	// then stopPicking and rewrite the processHits method which is called
	// on the end of stopPicking.
	class GLPicker
	{
	public:

		virtual ~GLPicker();

		// To override, but the default contains an simple example how it can be used.
		virtual void processHits(GLint hits, GLuint buffer[]);

		void startPicking(int cursorX, int cursorY);
		void stopPicking();

	protected:

		GLPicker();

	private:

		GLuint selectBuf[BUFF_SIZE];
	};
}
#endif
